package com.dalongxin.work.data;

import com.j256.ormlite.field.DatabaseField;
import com.j256.ormlite.table.DatabaseTable;

import java.io.Serializable;

@DatabaseTable(tableName="user")
public class User implements Serializable {

    //@Column(name = "id",isId = true,autoGen = true)//主键,自增
    @DatabaseField
    private long id;
    @DatabaseField(columnName = "login_name")
    private String loginName;
    @DatabaseField(columnName = "login_password")
    private String loginPass;
    @DatabaseField(columnName = "username")
    private String userName;
    @DatabaseField(columnName="department_id")
    private String departmentId;
    @DatabaseField(columnName = "phone")
    private String phone;
    @DatabaseField(columnName = "email")
    private String email;
    @DatabaseField(columnName = "token")
    private String accessToken;
    @DatabaseField(columnName = "last_login")
    private int lastLogin;// 1为最后一次登录的是此条记录对应的账号，其他为不是
    @DatabaseField(columnName = "login_time")
    private long loginTime;
    @DatabaseField(columnName = "login_type")
    private int loginType;//0 用户名密码登录 1 验证码登录

    public long getId() {
        return id;
    }

    public void setId(long id) {
        this.id = id;
    }

    public String getLoginName() {
        return loginName;
    }

    public void setLoginName(String loginName) {
        this.loginName = loginName;
    }

    public String getLoginPass() {
        return loginPass;
    }

    public void setLoginPass(String loginPass) {
        this.loginPass = loginPass;
    }

    public String getUserName() {
        return userName;
    }

    public void setUserName(String userName) {
        this.userName = userName;
    }

    public String getDepartmentId() {
        return departmentId;
    }

    public void setDepartmentId(String departmentId) {
        this.departmentId = departmentId;
    }

    public String getPhone() {
        return phone;
    }

    public void setPhone(String phone) {
        this.phone = phone;
    }

    public String getEmail() {
        return email;
    }

    public void setEmail(String email) {
        this.email = email;
    }

    public String getAccessToken() {
        return accessToken;
    }

    public void setAccessToken(String accessToken) {
        this.accessToken = accessToken;
    }

    public int getLastLogin() {
        return lastLogin;
    }

    public void setLastLogin(int lastLogin) {
        this.lastLogin = lastLogin;
    }

    public long getLoginTime() {
        return loginTime;
    }

    public void setLoginTime(long loginTime) {
        this.loginTime = loginTime;
    }

    public int getLoginType() {
        return loginType;
    }

    public void setLoginType(int loginType) {
        this.loginType = loginType;
    }
}
